package org.springframework.boot.autoconfigure.mock.strategy;

import org.springframework.boot.autoconfigure.mock.model.MockResMeta;
import org.springframework.boot.autoconfigure.mock.model.MockResTypeEnum;

/**
 * @author: hooware
 * @Date: 2021/12/26 18:12
 * @Description:
 */
public interface IMockResProcessor {

    /**
     * 匹配IMockResProcessor策略
     *
     * @param mockResTypeEnum mock res类型
     * @return 是否匹配
     */
    boolean match(MockResTypeEnum mockResTypeEnum);

    /**
     * mock res 策略处理
     *
     * @param mockResMeta mock注解meta
     * @return Object, 返回null时代表未匹配到策略
     */
    Object mockProcess(MockResMeta mockResMeta) throws ReflectiveOperationException;
}
